SlideShare a Scribd company logo
1 of 10
PHP Les 2  Programmeren Mediatechnologie Blok 8
PHP Lussen Lussen worden gebruikt om in het script gebeurtenis te laten herhalen! De eenvoudigste lus die gebruikt wordt  is de:for …. next -lus
PHP For .. next Code Resultaat
PHP While While wordt gebruikt als type lus die puur gebaseerd is op een conditie. Zolang de conditie waar is, wordt de lus uitgevoerd.Daarna gaat het script door met de volgende actie.
PHP Do .. While Do .. while wijkt af van while. De code tussen do en while deaccolades wordt eerste uitgevoerd, pas daarna wordt de conditiegeverifieerd. De do while wordt dus minimaal 1 maal uitgevoerd.
PHP Stringbewerkingen In veel gevallen moeten we een string bewerken, bijvoorbeeldde spaties moeten we er uit halen of hebben we alleen de 1e10 tekens nodig. Of willen we string splitsen bijv. voornaam, Achternaam en tussenvoegsel willen we splitsen. Of we willen controleren of er voldoende tekens zijn ingevoerd, of de juiste tekens.
PHP Stringlengte / strlen Stel je voor een klant moet het telefoonnummer invullen.Dit telefoonnummer moet 10 tekens bevatten.Om dit te controleren gebruiken we de functie ‘strlen’.Dezefunctiegeeft het aantaltekens in de string weer.
PHP String opdelen / substr Een string kanookgesplitstworden in verschillendedelen.Hiervoorkan je de instructie ‘substr’ (substring) gebruiken. Deze op verschillendemanierenaangeroepenworden.
String opdelen / substr/ 2 Zero-based functies!Het tellen begint bij 0 en niet bij 1.
Opdracht: Maakeenwebomgeving met navigatievoor de tafels van 1 tot en met 20.Max. 2 tafels per pagina en gebruik styling d.m.v. CSS en HTML. Upload dezenaar je eigenwebomgeving en show het resultaataan de docent en/of mail de link naarm.v.ginkel@rocleiden.nl

More Related Content

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
Simplilearn
 

Featured (20)

How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 
Introduction to C Programming Language
Introduction to C Programming LanguageIntroduction to C Programming Language
Introduction to C Programming Language
 

Les 2 php prog 1

  • 1. PHP Les 2 Programmeren Mediatechnologie Blok 8
  • 2. PHP Lussen Lussen worden gebruikt om in het script gebeurtenis te laten herhalen! De eenvoudigste lus die gebruikt wordt is de:for …. next -lus
  • 3. PHP For .. next Code Resultaat
  • 4. PHP While While wordt gebruikt als type lus die puur gebaseerd is op een conditie. Zolang de conditie waar is, wordt de lus uitgevoerd.Daarna gaat het script door met de volgende actie.
  • 5. PHP Do .. While Do .. while wijkt af van while. De code tussen do en while deaccolades wordt eerste uitgevoerd, pas daarna wordt de conditiegeverifieerd. De do while wordt dus minimaal 1 maal uitgevoerd.
  • 6. PHP Stringbewerkingen In veel gevallen moeten we een string bewerken, bijvoorbeeldde spaties moeten we er uit halen of hebben we alleen de 1e10 tekens nodig. Of willen we string splitsen bijv. voornaam, Achternaam en tussenvoegsel willen we splitsen. Of we willen controleren of er voldoende tekens zijn ingevoerd, of de juiste tekens.
  • 7. PHP Stringlengte / strlen Stel je voor een klant moet het telefoonnummer invullen.Dit telefoonnummer moet 10 tekens bevatten.Om dit te controleren gebruiken we de functie ‘strlen’.Dezefunctiegeeft het aantaltekens in de string weer.
  • 8. PHP String opdelen / substr Een string kanookgesplitstworden in verschillendedelen.Hiervoorkan je de instructie ‘substr’ (substring) gebruiken. Deze op verschillendemanierenaangeroepenworden.
  • 9. String opdelen / substr/ 2 Zero-based functies!Het tellen begint bij 0 en niet bij 1.
  • 10. Opdracht: Maakeenwebomgeving met navigatievoor de tafels van 1 tot en met 20.Max. 2 tafels per pagina en gebruik styling d.m.v. CSS en HTML. Upload dezenaar je eigenwebomgeving en show het resultaataan de docent en/of mail de link naarm.v.ginkel@rocleiden.nl